'use strict';

/**
 * terms-info controller
 */

const { createCoreController } = require('@strapi/strapi').factories;

module.exports = createCoreController('api::terms-info.terms-info',({ strapi }) =>  ({
    async hello(ctx) {
      try {
        ctx.body = 'happy every day ~';
      } catch (err) {
        ctx.body = err;
      }
    },
    async find(ctx) {
      ctx.query = { ...ctx.query, local: 'en' }
      const { data, meta } = await super.find(ctx);
      meta.date = Date.now()
      return { data, meta };
    },
   
  }))
